home *** CD-ROM | disk | FTP | other *** search
- on new me
- return me
- end
-
- on autoMove me, pSprite, pLoc, pRot --pLoc: funkar med loc och rect, på rect tar han det övre vänstra hörnet och gör en loc av!
- if pRot <> void then --rotationOption
- firstRot = pSprite.rotation
- divideThis = firstRot - pRot
- dividum = divideThis / 5
- pSprite.locZ = 155
- else
- pSprite.locZ = 100
- end if
- goalLoc = point(pLoc[1], pLoc[2])
- repeat with n = 1 to 5
- t = the ticks + 3
- repeat while the ticks < t
- end repeat
- firstLoc = pSprite.loc
- middleLoc = goalLoc + ((firstLoc - goalLoc) / 2)
- pSprite.loc = middleLoc
- if pRot <> void then
- pSprite.rotation = pSprite.rotation + dividum
- end if
- updateStage
- end repeat
- pSprite.locZ = pSprite.spriteNum
- pSprite.loc = goalLoc
- updateStage
- end
-
-